<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {

	public function index() {
		switch ($this->index->logado()) {
			case 'mesa':
				$this->load->model('Categoria');
				$this->load->model('Categoria');
				$aData['categorias'] = $this->Categoria->ler();
				$this->index->montarPagina('mesa/mesa_view', $aData);
				break;
			case 'caixa':
				$this->index->montarPagina('comanda/comanda_view');
				break;
			case 'bar':
				$this->index->montarPagina('pedido/pedido_bar_view');
				break;
			case 'cozinha':
				$this->index->montarPagina('pedido/pedido_cozinha_view');
				break;
			case 'administrador':
				$this->index->montarPagina('usuario/usuario_view');
				break;
			default:
				if(isset($_GET['85770ae9def3473f559e0dbe0609060a']) && isset($_GET['e8d95a51f3af4a3b134bf6bb680a213a']) && $_GET['e8d95a51f3af4a3b134bf6bb680a213a'] == 'aberta') {
					redirect('usuarios/login/' . $_GET['85770ae9def3473f559e0dbe0609060a'] . '/' . $_GET['e8d95a51f3af4a3b134bf6bb680a213a']);
				} else {
					$this->index->montarPagina('usuario/login_view');
				}
				break;
		}
		
	}
}

/* End of file home.php */
/* Location: ./application/controllers/home.php */